<template>
	<view>
		
		<view class="">
			
			<view class="">
				<view class=" padding-sm   flex text-bold justify-between align-baseline ">
					<view class=" title text-blue">
						<text @tap="zaixianKefu" class="margin-right">在线客服</text>
						<text @tap="callKefu" class="margin-right">客服电话:4001033801</text>
					</view>
				</view>
				<view class="">
					<view class="bg-white shadow radius padding" v-html="asetting.kdzn">
						
					</view>
				</view>
			</view>
			
			<!-- <view>
				<view class=" padding-sm bg-blue text-white  flex text-bold justify-between align-baseline ">
					<view class=" title">
						<text class="text-xxl  ">
							<text class="iconfont "></text>
						</text>
						<text class="">房东开店申请及注册</text>
					</view>
				</view>
				<view class="padding-sm">
					<view class="bg-white shadow radius padding" v-html="asetting.kdsq">
						
					</view>
				</view>
			</view> -->
			
			
		</view>
	</view>
</template>

<script>
	export default {
		data: function() {
			return {
				asetting: {
					mztk: "",
					kdzn: "",
					kdsq: ""
				}
			};
		},
		created: function(){
			this.init();
		},
		methods: {
			init: function() {
				this.api("/org/sm").send({}).then(data => {
					this.asetting = data.asetting;
				});
			},
			toNewMd: function() {
				if (!this.store.state.client.tx) {
					this.message.info("请先设置人脸");
					return;
				}
				
				if (!this.store.state.client.nc) {
					this.message.info("请先设置昵称");
					return;
				}
				
				if (!this.store.state.client.tel) {
					this.message.info("请先设置电话");
					uni.navigateTo({
						url: "/pages/cdz/main?tag=wd"
					});
					return;
				}
				uni.navigateTo({
					url: "/pages/cdz/md/new"
				});
			},
			callKefu: function() {
				uni.makePhoneCall({
					phoneNumber: "4001033801"
				});
			},
			zaixianKefu: function() {
				wx.openCustomerServiceChat({
					extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc7ae0620f47af7118'},
					corpId: 'wwfc95d22f0134437d',
					success: function(res) {
						console.log(res);
					},
					fail: function(err) {
						console.log(err);
					}
				});
			}
		}
	}
</script>

<style>
</style>